package com.ofps.web.controller.forms;

import com.ofps.forms.common.utils.R;
import com.ofps.forms.domain.Dto.MyFormDto;
import com.ofps.forms.domain.Dto.RecordDto;
import com.ofps.forms.service.impl.WriteRecordServiceImpl;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 记录表
 *
 * @author pyn 2022/6/16
 */
@RestController
@RequestMapping("record")
public class RecordController {
    /**
     * 根据用户查询表单列表 返回表单（form）
     * 参数为RecycleBin
     */
    @Autowired
    private WriteRecordServiceImpl writeRecordService;

    @RequestMapping("/list")
    @RequiresPermissions("record:list")
    public R queryFormList(@RequestBody RecordDto recordDto) {
        return writeRecordService.myList(recordDto);
    }

}
